#include "sqlitetest.h"
#include <QIcon>
#include <QVBoxLayout>
#include <QPropertyAnimation>
#include <src/commom/stackstatuswidget.h>
#include <src/clean/common/cleanscanbottom.h>
#include <QDebug>
sqliteTest::sqliteTest(QWidget *parent) : QWidget(parent)
{
    this->initUI();
    initConnect();

}

void sqliteTest::initUI()
{
    this->setFixedSize(900, 600);
    this->setWindowIcon(QIcon(":/main/Logo"));
    this->setWindowTitle(tr("test"));
    m_stackStatusWidget = new StackStatusWidget;
    m_stackStatusWidget->setStaticIcon(":/safe/logo_normal");
    m_stackStatusWidget->setNormalButton(":/safe/start");
    m_stackStatusWidget->setTextInfo("奥瑞", "内部测试");
    m_stackStatusWidget->m_normalButton4->show();
    m_topBackWidget = new WenliBackWidget;
    m_topBackWidget->insertWidget(m_stackStatusWidget);
    m_topBackWidget->setButtonInfo(":/safe/return");
    m_topBackWidget->setFixedHeight(150);//绿条的宽度
    m_sqlTest = new sqlTest;

    QVBoxLayout *vLayout = new QVBoxLayout;
    vLayout->addWidget(m_topBackWidget);
    vLayout->addWidget(m_sqlTest);
    vLayout->setSpacing(0);
    vLayout->setContentsMargins(0,0,0,0);
    this->setLayout(vLayout);


}

void sqliteTest::initConnect()
{
    connect(m_topBackWidget, SIGNAL(buttonClicked()), this, SIGNAL(goToMain()));
    connect(m_topBackWidget, SIGNAL(showMin()), this, SIGNAL(showMin()));
    connect(m_topBackWidget, SIGNAL(closeWidget()), this, SIGNAL(closeWidget()));
    connect(m_stackStatusWidget, SIGNAL(normalClicked4()), this, SLOT(goclean()));
}

void sqliteTest::goclean()
{
m_sqlTest->cleanSql();

}


